import React from 'react'
import uuid from 'uuid'
import PropTypes from 'prop-types'
import {connect} from 'react-redux'

import * as actions from '../../actions'

class SubMenuItem extends React.Component {
    constructor(props) {
        super(props) 
        this.state = {

        }
    }

    render() {
        return (
            <li className="sidebar-item">
                <a href={'#' + this.props.menu.url} className="sidebar-link" onClick={()=>this.props.setCurSelMenu(this.props.menuId)}>
                    <i className="icon-Record"></i>
                    <span className="hide-menu"> {this.props.menu.name} </span>
                </a>
            </li>
        )
    }
}

export default connect(null, actions)(SubMenuItem)
